<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>好看的双栏博客</title>
    {% block css %}
    {% endblock %}
</head>
<body>
<div class="cl-header container-fluid" id="app">
    <div class="header-content container">
        <nav class="navbar navbar-expand-lg navbar-light">
            <a class="navbar-brand" href="{% url 'home:index' %}">
                <img src="/static/img/3..jpeg" width="144" height="72" alt="">
            </a>
            <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
                <span class="navbar-toggler-icon"></span>
            </button>
            <div class="collapse navbar-collapse justify-content-end" id="navbarNav">
                <ul class="navbar-nav">
                    {% block title %}
                    {% endblock %}
                    <li class="nav-item">
{#                        <a class="nav-link" href="#">[[username]]</a>#}
                        <!-- 如果用户已经登录，则显示用户名下拉框 -->
                            <li class="nav-item dropdown" v-if="is_login">
                                <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" @click="show_menu_click">{{ username }}</a>
                                <div class="dropdown-menu" aria-labelledby="navbarDropdown" style="display: block" v-show="show_menu">
                                    <a class="dropdown-item" href="{% url 'home:write' %}">写文章</a>
                                    <a class="dropdown-item" href='{% url 'users:zhong' %}'>个人信息</a>
                                    <a class="dropdown-item" href='{% url 'users:logout' %}'>退出登录</a>
                                </div>

                            <!-- 如果用户未登录，则显示登录按钮 -->
                            <li class="nav-item" v-else>
                                <a class="nav-link" href="{% url 'users:login' %}">登录</a>

                    </li>
                </ul>
            </div>
        </nav>
    </div>
</div>

<div class="cl-cantainer container">
    <div class="row">
    {% block content %}
    {% endblock %}
    <div class="right-card">
            <div class="right-card-main">
            <div class="right-card-title">热门标签</div>
            <ul class="label">
                {% for foo in tay %}
                    <li><a href="{% url 'home:detail' %}?art_id={{ foo.id }}">{{ foo.tags }}</a></li>
                {% endfor %}
            </ul>
        </div>
        </div>
    </div>
</div>



<div class="container-fluid cl-footer">
    <div class="container">
        <p class="cl-copyright">本设计由简.工作室荣誉出品</p>
        <p class="cl-copyright">copyright @ 2017~2018 简.工作室（www.jeanstudio.cn）</p>
    </div>
</div>
{% block js %}
{% endblock %}
</body>
</html>
